import { PersistedStateOptions } from "pinia-plugin-persistedstate";

const piniaPersistConfig = (key: string) => {
  const persist: PersistedStateOptions = {
    key,
    storage: localStorage,
    // 只持久化指定的状态
    paths: ["layout", "assemblySize", "language", "primary", "isDark", "isGrey", "isWeak", "asideInverted", "isCollapse", "breadcrumb", "breadcrumbIcon", "tabs", "tabsIcon", "footer", "isWatermark"]
  };
  return persist;
};

export default piniaPersistConfig;
